package com.reebake.ideal.permission.controller.client;

import com.reebake.ideal.permission.client.RoleClient;
import com.reebake.ideal.permission.service.PermissionAuthService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("role")
@RequiredArgsConstructor
public class RoleClientController implements RoleClient {
    private final PermissionAuthService permissionAuthService;

    @Override
    public List<String> queryCodeByUserId(String userId) {
        return permissionAuthService.queryRoleCodeByUserId(userId);
    }
}
